import pngcanvas

width = 500
height = 500
c = pngcanvas.PNGCanvas(width, height)
# c.color = (255, 0, 0, 0xff)
img = open("DotDensity.png", "wb")
c.polyline([[100,100],[400,100]])
c.polyline([[100,100],[100,400]])
img.write(c.dump())
img.close()